package com.woniuxy03;

import java.util.Scanner;

public class Test01 {
    public static void main(String[] args) {
//        Car car=new Benz();
//        car.run();
//        car=new Bmw();
//        car.run();
        Scanner sc = new Scanner(System.in);
        System.out.println("你要购买的车:bwm或者benz");
        String type=sc.next();
        Car car = CarFactory.createCar(type);
        car.run();
    }
}
